package utils

import (
	"crypto/md5"
	"encoding/hex"
	"github.com/satori/go.uuid"
)

func MD5(str string) string  {
	h := md5.New()
	h.Write([]byte(str))
	return hex.EncodeToString(h.Sum(nil))
}

func NewUUID()(string,error){
	u2, err := uuid.NewV4()
	if err != nil {
		return "",err
	}
	return u2.String(),nil
}

